// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';

export const getProjectList = (params) => {
  return postRequest('/project/getAllList', params)
}

export const insertProject = (params) => {
  return postRequest('/project/insert', params)
}

export const checkProject = (params) => {
  return postRequest('/project/checkProjectCode', params)
}

export const updateProject = (params) => {
  return postRequest('/project/update', params)
}

export const getAllProject = () => {
  return postRequest('/project/getAll')
}

export const getSituationParams = () => {
  return postRequest('/typeName/getSituation')
}

export const getSituationList = params => {
  return postRequest('/projectSituation/getList', params)
}

export const getNewSituationProject = () => {
  return postRequest('/project/getIdNotInSituation')
}

export const insertProjectSituation = params => {
  return postRequest('/projectSituation/insert', params)
}

export const updateProjectSituation = params => {
  return postRequest('/projectSituation/update', params)
}

export const getPoleDetail = params => {
  return postRequest('/poleDetail/getList', params)
}

export const getSumPoleDetail = params => {
  return postRequest('/poleDetail/getSumList', params)
}

export const getTypicalDesign = params => {
  return postRequest('/sysTypicalDesign/getName', params)
}

export const getSysTypicalClass = () => {
  return postRequest('/sysTypicalClass/getSysAll')
}

export const getMyTypicalClass = () => {
  return postRequest('/sysTypicalClass/getMyAll')
}

export const insertPoleDetail = params => {
  return postRequest('/poleDetail/insert', params)
}

export const getProjectMaterial = params => {
  return postRequest('/projectMaterial/getAll', params)
}

export const getProjectMaterialDefine = params => {
  return postRequest('/projectMaterialDefine/getList', params)
}

export const insertPoleSummary = params => {
  return postRequest('/poleSummary/insert', params)
}

export const createProjectMaterial = params => {
  return postRequest('/projectMaterial/insertFromPole', params);
}

export const deleteProjectMaterial = params => {
  return postRequest('/projectMaterial/destroy', params)
}

export const deleteProjectMaterialDefine = params => {
  return postRequest('/projectMaterialDefine/destroy', params)
}

export const updateProjectMaterial = params => {
  return postRequest('/projectMaterial/update', params)
}

export const updateProjectMaterialDefine = params => {
  return postRequest('/projectMaterialDefine/update', params)
}

export const getProjectBudget = params => {
  return postRequest('/projectBudget/getList', params)
}

export const getNewBudgetProject = () => {
  return postRequest('/project/getIdNotInBudget')
}

export const insertProjectBudget = params => {
  return postRequest('/projectBudget/insert', params)
}

export const updateProjectBudget = params => {
  return postRequest('/projectBudget/update', params)
}

export const getBudgetById = params => {
  return postRequest('/projectBudget/getById', params)
}

export const deleteFile = params => {
  return postRequest('/fileDestroy', params)
}

export const getProject = () => {
  return postRequest('/project/getName')
}

export const getDesignContent = params => {
  return postRequest('/projectSituation/getDesignContent', params)
}

export const sendMessage = params => {
  return postRequest('/sendShortMessage', params)
}

export const getAllAttachment = params => {
  return postRequest('/attachment/getByProjectId', params)
}

export const getAttachment = params => {
  return postRequest('/attachment/getByType', params)
}

export const insertAttachment = params => {
  return postRequest('/attachment/insert', params)
}

export const destroyAttachment = params => {
  return postRequest('/attachment/destroy', params)
}

export const getProjectSource = params => {
  return postRequest('/projectCompleted/getList', params)
}

export const getDesignSheets = () => {
  return postRequest('/designSheets/getList')
}